home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / comm / net / Dialup14.lha / Dialup / Install / Dialup-Install < prev    next >
Text File  |  1995-01-22  |  8KB  |  328 lines

  1. ; $VER: Install-MagicCX 1.0 (2.8.94)
  2. ; Install script for MagicCX (Workbench 2.1 or higher)
  3.  
  4.  
  5. ;*************************************************************************
  6. ; English strings
  7. ;*************************************************************************
  8.  
  9. (set default_lang 256)
  10.  
  11. (set #MSG_BADKICK (cat "You must be using Kickstart 2.04 or higher to use Dialup.\n\nAborting!"))
  12. (set #MSG_INSTALL (cat "\nDialup installation script.\nThis script installs Dialup on your Amiga."))
  13. (set #MSG_ICON_TYPE "Which type of icons would you like to install?")
  14. (set #MSG_ICON_MGWB "MagicWB: 8 colors")
  15. (set #MSG_ICON_NORM "Normal : 4 colors")
  16. (set #MSG_DRAWER "Please locate a directory where Dialup will be installed. A directory named \"Dialup\" will be created.")
  17. (set #MSG_CREATE_DIR "\n\nInstalling Dialup to\n\n")
  18. (set #MSG_INSTALL_MAIN "\n\nInstalling main program")
  19. (set #MSG_INSTALL_LANG "Which languages should be installed?")
  20. (set #MSG_INSTALLING "\n\nInstalling ")
  21. (set #MSG_TO " to ")
  22. (set #MSG_REG_USER "\n\nWelcome registered user...\n\nThanks for your support!")
  23. (set #MSG_COPY_LANG "Installing language...")
  24. (set #MSG_DO_INSTALL_DOC "Would you like to install Dialup's documentation?")
  25. (set #MSG_DOC_LANG "Which language do you prefer for the documentation?")
  26. (set #MSG_DO_INSTALL_LIB "Would you like to install version 6.3 of Olaf 'Olsen' Barthel's \"gtlayout.library\"?\n\nDialup need v5.x or higher!")
  27.  
  28. ;*************************************************************************
  29. ; German strings
  30. ;*************************************************************************
  31.  
  32. (if (= @language "deutsch")
  33. (
  34.     (set default_lang 1)
  35.  
  36.     (set #MSG_BADKICK (cat "Sie müssen Kickstart 2.04 oder höher benutzen, um Dialup zu starten.\n\nAbbruch!"))
  37.     (set #MSG_INSTALL (cat "\nDialup Installations Skript.\nDieses Skript installiert Dialup auf Ihrem Amiga."))
  38.     (set #MSG_ICON_TYPE "Welche Piktogramme wollen Sie installieren?")
  39.     (set #MSG_ICON_MGWB "MagicWB: 8 Farben")
  40.     (set #MSG_ICON_NORM "Normal : 4 Farben")
  41.     (set #MSG_DRAWER "Wählen Sie ein Verzeichnis, in das Dialup installiert werden soll. Ein Verzeichnis mit dem Namen \"Dialup\" wird dort erstellt.")
  42.     (set #MSG_CREATE_DIR "\n\nInstalliere Dialup nach\n\n")
  43.     (set #MSG_INSTALL_MAIN "\n\nInstalliere Hauptprogramm")
  44.     (set #MSG_INSTALL_LANG "Welche Sprache soll installiert werden?")
  45.     (set #MSG_INSTALLING "\n\nInstalliere ")
  46.     (set #MSG_TO " nach ")
  47.     (set #MSG_REG_USER "\n\nWillkommen registrierter Benutzer...\n\nDanke für Ihre Unterstützung!")
  48.     (set #MSG_COPY_LANG "Installiere Sprachunterstützung...")
  49.     (set #MSG_DO_INSTALL_DOC "Möchten Sie die Anleitung zu Dialup installieren?")
  50.     (set #MSG_DOC_LANG "Welche Sprache bevorzugen Sie für die Anleitung?")
  51.     (set #MSG_DO_INSTALL_LIB "Möchten Sie Version 6.3 von Olaf 'Olsen' Barthel's \"gtlayout.library\" installieren?\n\nDialup benötigt v5.x oder höher!")
  52. ))
  53.  
  54. (complete 0)
  55.  
  56. ;*************************************************************************
  57. ; Check system we`re running on
  58. ;*************************************************************************
  59.  
  60. (if (< (/ (getversion) 65536) 37)
  61. (
  62.     (abort #MSG_BADKICK)
  63. ))
  64.  
  65. ;*************************************************************************
  66. ; Initial message
  67. ;*************************************************************************
  68.  
  69. (message #MSG_INSTALL)
  70.  
  71. ;*************************************************************************
  72. ; Get IconTypes
  73. ;*************************************************************************
  74.  
  75. (set IconType
  76.     (askchoice
  77.         (prompt #MSG_ICON_TYPE)
  78.         (help @askchoice-help)
  79.         (choices
  80.             #MSG_ICON_MGWB
  81.             #MSG_ICON_NORM
  82.         )
  83.         (default 0)
  84.     )
  85. )
  86.  
  87. (complete 10)
  88.  
  89. ;*************************************************************************
  90. ; Get directory where to install MagicCX to
  91. ;*************************************************************************
  92.  
  93. (set DUPBase
  94.         (askdir
  95.             (prompt #MSG_DRAWER)
  96.             (default "RAM:")
  97.             (help #askdir-help)
  98.         )
  99. )
  100. (set DUPDir (tackon DUPBase "Dialup"))
  101.  
  102. (complete 20)
  103.  
  104. ;*************************************************************************
  105. ; Create Directory
  106. ;*************************************************************************
  107.  
  108. (message (cat #MSG_INSTALLING "\"Dialup\"" #MSG_TO "\"" DUPDir "\"..."))
  109.  
  110. (makedir DUPDir
  111.     (prompt #MSG_CREATE_DIR)
  112.     (help @makedir-help)
  113. )
  114.  
  115. (if (= IconType 0)
  116. (
  117.     (copyfiles
  118.         (source "/Icons/8/Drawer/Dialup.info")
  119.         (dest DUPBase)
  120.     )
  121. ))
  122.  
  123. (if (= IconType 1)
  124. (
  125.     (copyfiles
  126.         (source "/Icons/4/Drawer/Dialup.info")
  127.         (dest DUPBase)
  128.     )
  129. ))
  130.  
  131. (complete 30)
  132.  
  133. ;*************************************************************************
  134. ; Copy main program
  135. ;*************************************************************************
  136.  
  137. (copylib
  138.     (prompt #MSG_INSTALL_MAIN)
  139.     (help @copylib-help)
  140.     (source "/Dialup")
  141.     (dest DUPDir)
  142. )
  143.  
  144. (if (= IconType 0)
  145. (
  146.     (copyfiles
  147.         (source "/Icons/8/Dialup.info")
  148.         (dest DUPDir)
  149.     )
  150. ))
  151.  
  152. (if (= IconType 1)
  153. (
  154.     (copyfiles
  155.         (source "/Icons/4/Dialup.info")
  156.         (dest DUPDir)
  157.     )
  158. ))
  159.  
  160. (complete 40)
  161.  
  162. (tooltype
  163.     (dest (tackon DUPDir "Dialup"))
  164.     (setstack 8192)
  165.     (noposition)
  166. )
  167.  
  168. (tooltype
  169.     (dest (tackon DUPBase "Dialup"))
  170.     (noposition)
  171. )
  172. (complete 50)
  173.  
  174. ;*************************************************************************
  175. ; Install KeyFile
  176. ;*************************************************************************
  177.  
  178. (if (exists "/Dialup.key")
  179. (
  180.     (message #MSG_REG_USER)
  181.  
  182.     (copyfiles
  183.         (help @copyfiles-help)
  184.         (source "/Dialup.key")
  185.         (dest DUPDir)
  186.     )
  187. ))
  188.  
  189. (complete 60)
  190.  
  191. ;*************************************************************************
  192. ; Install Locale
  193. ;*************************************************************************
  194.  
  195. (if (AND (NOT (= (getassign "Locale") "")) (exists "libs:locale.library"))
  196. (
  197.     (set Lang
  198.         (askoptions
  199.             (prompt #MSG_INSTALL_LANG)
  200.             (help @askoptions-help)
  201.             (choices
  202.                 "German"
  203.             )
  204.             (default default_lang)
  205.         )
  206.     )
  207.  
  208.     (if (IN Lang 0)
  209.     (
  210.         (working #MSG_COPY_LANG)
  211.         (run "/C/LhX x /Locale/Deutsch/Locale LOCALE:")
  212.     ))
  213. ))
  214.  
  215. (complete 70)
  216.  
  217. ;*************************************************************************
  218. ; Install Documentaion
  219. ;*************************************************************************
  220.  
  221. (if
  222.     (askbool
  223.         (prompt #MSG_DO_INSTALL_DOC)
  224.         (help @askbool-help)
  225.     )
  226. (
  227.  
  228.     ;** Create directory and copy icons
  229.  
  230.     (makedir (tackon DUPDir "Docs"))
  231.  
  232.     (if (= IconType 0)
  233.     (
  234.         (copyfiles
  235.             (source "/Icons/8/Drawer/Docs.info")
  236.             (dest DUPDir)
  237.         )
  238.  
  239.         (copyfiles
  240.             (source "/Icons/8/Dialup.guide.info")
  241.             (dest (tackon DUPDir "Docs"))
  242.         )
  243.     ))
  244.  
  245.     (if (= IconType 1)
  246.     (
  247.         (copyfiles
  248.             (source "/Icons/4/Drawer/Docs.info")
  249.             (dest DUPDir)
  250.         )
  251.  
  252.         (copyfiles
  253.             (source "/Icons/4/Dialup.guide.info")
  254.             (dest (tackon DUPDir "Docs"))
  255.         )
  256.     ))
  257.  
  258.     (tooltype
  259.         (dest (tackon DUPDir "Docs"))
  260.         (noposition)
  261.     )
  262.  
  263.     (tooltype
  264.         (dest (tackon DUPDir "Docs/Dialup.guide"))
  265.         (noposition)
  266.     )
  267.  
  268.     ;** Ask language
  269.  
  270.     (set DocLang
  271.         (askchoice
  272.             (prompt #MSG_DOC_LANG)
  273.             (help @askchoice-help)
  274.             (choices
  275.                 "Deutsch"
  276.                 "English"
  277.             )
  278.             (if (= default_lang 256) ( (default 1) )( (default 0) ))
  279.         )
  280.     )
  281.  
  282.     ;** German part
  283.  
  284.     (if (= DocLang 0)
  285.     (
  286.         (copyfiles
  287.             (help @copyfile-help)
  288.             (source "/Docs/Dialup-GER.guide")
  289.             (dest (tackon DUPDir "Docs")
  290.             (newname "Dialup.guide")
  291.         ))
  292.     ))
  293.  
  294.     ;** English part
  295.  
  296.     (if (= DocLang 1)
  297.     (
  298.         (copyfiles
  299.             (help @copyfile-help)
  300.             (source "/Docs/Dialup-ENG.guide")
  301.             (dest (tackon DUPDir "Docs")
  302.             (newname "Dialup.guide")
  303.         ))
  304.     ))
  305. ))
  306.  
  307. (complete 80)
  308.  
  309. ;*************************************************************************
  310. ; Install library
  311. ;*************************************************************************
  312.  
  313. (if
  314.     (askbool
  315.         (prompt #MSG_DO_INSTALL_LIB)
  316.         (help @askbool-help)
  317.     )
  318. (
  319.     (copyfiles
  320.         (source "/Libs/gtlayout.library")
  321.         (dest "Libs:")
  322.     )
  323. ))
  324.  
  325. (complete 100)
  326.  
  327. (set @default-dest (expandpath DUPDir))
  328.